home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4455 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  27 lines

  1. Newsgroups: comp.lang.c
  2. Path: nntp.coast.net!torn!utnut!utzoo!spenford!henry
  3. From: Henry Spencer <henry@zoo.toronto.edu>
  4. Subject: Re: why not add getch() to the std C RTL?
  5. References: <DM85L8.5Jn@emr1.emr.ca> <bnelsonDM887t.LDI@netcom.com>
  6. Sender: henry%spenford@zoo.toronto.edu (Henry Spencer)
  7. Organization: SP Systems, Toronto
  8. Date: Sun, 4 Feb 1996 20:28:38 GMT
  9. Message-ID: <DM9q7q.4wt%spenford@zoo.toronto.edu>
  10.  
  11. > There are *many* people who want to do the following in their C programs:
  12. > - read a single unbuffered keystroke (getch() in DOS, ioctl in unix...)
  13.  
  14. The reason this isn't in standard C is quite simple:  there are operating
  15. systems -- ones with substantial C user communities -- which cannot do
  16. this.  Their keyboard input is always buffered.
  17.  
  18. It could have been defined as an optional feature, I suppose, but the ANSI
  19. C committee was firmly opposed to "standards" which have multiple flavors;
  20. they wanted to write one standard, not a whole family of them.  (In the
  21. end, they didn't quite succeed -- standard C is actually two standards,
  22. one each for "hosted" and "free-standing" environments -- but they came a
  23. lot closer than certain other standards.)
  24. -- 
  25. Space will not be opened by always                 |       Henry Spencer
  26. leaving it to another generation.   --Bill Gaubatz |   henry@zoo.toronto.edu
  27.